﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Ross.Service.Dto
{
    public class LoginVM
    {
        /// <summary>
        /// 前端传入的登录名
        /// </summary>
        public string username { get; set; }
        /// <summary>
        /// 前端传入的密码
        /// </summary>
        public string password { get; set; }
        /// <summary>
        /// 前端登录时传入的年份
        /// </summary>
        public string year { get; set; }

    }
    public class oUser
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 用户名.
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 密码.
        /// </summary>
        public string password { get; set; }

        /// <summary>
        /// 员工工号.
        /// </summary>
        public string EmpID { get; set; }

        /// <summary>
        /// 员工姓名.
        /// </summary>
        public string EmpName { get; set; }

        /// <summary>
        /// 员工所在的部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 员工可查阅的部门.
        /// </summary>
        public string AuthorizedDepartment { get; set; }

        /// <summary>
        /// 是否激活.
        /// </summary>
        public bool IsActive { get; set; }
    }

    public class UptPsw
    {
        public int UserId { get; set; }
        public string OrgPassword { get; set; }
        public string Password { get; set; }
    }

    public class MonthlyPlan
    {
        public int ID { get; set; }
        /// <summary>
        /// 目标.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }
        // <summary>
        /// 开始时间.
        /// </summary>
        public DateTime StartingTime { get; set; }

        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime PlannedCompletionTime { get; set; }

        /// <summary>
        /// 责任人.
        /// </summary>
        public string Responsible { get ; set; }

        /// <summary>
        /// 进展情况
        /// </summary>
        public string Progress { 
            get {
                if (!(TargetState == "已完成"))
                {
                    if ((PlannedCompletionTime - DateTime.Now).TotalDays < 7 && PlannedCompletionTime.DayOfYear >= DateTime.Now.DayOfYear)
                        return "临近时间节点";
                    else if ((PlannedCompletionTime - DateTime.Now).TotalDays > 7 && PlannedCompletionTime.DayOfYear >= DateTime.Now.DayOfYear)
                        return "进行中";
                    else
                        return "逾期";
                }
                else
                    return TargetState;
            } }

        /// <summary>
        /// 实际完成时间.
        /// </summary>
        public DateTime? ActualCompletionTime { get; set; }

        /// <summary>
        /// 目标描述.
        /// </summary>
        public string TargetDescription { get; set; }

        /// <summary>
        /// 目标状态.
        /// </summary>
        public string TargetState { get; set; }

        /// <summary>
        /// 完成标准.
        /// </summary>
        public string CompletionCriteria { get; set; }
    }

    public class BSCReports_Co 
    {
        /// <summary>
        /// 向下搜索的ID
        /// </summary>
        public int CurrentID { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 部门不表.
        /// </summary>
        public string DepartmentTarget { get; set; }

        /// <summary>
        /// 部门目标
        /// </summary>
        public List<BSCReports_Co> Child { get; set; }
    }
    public class BSCReports_CoOut
    {
        /// <summary>
        /// 向下搜索的ID
        /// </summary>
        public int CurrentID { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 部门不表.
        /// </summary>
        public string DepartmentTarget { get; set; }
    }

    public class BSCReports_Dp
    {
        /// <summary>
        /// 向下搜索的ID
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; }
        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime StartingTime { get; set; }
        /// <summary>
        /// 实际完成时间.
        /// </summary>
        public DateTime ActualCompletionTime { get; set; }

        /// <summary>
        /// 计划完成时间
        /// </summary>
        public DateTime PlannedCompletionTime { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 目标状态.
        /// </summary>
        public string TargetState { get; set; }

        /// <summary>
        /// 责任人.
        /// </summary>
        public string Responsible { get; set; }
        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 核算方式.
        /// </summary>
        public string AccountingMethod { get; set; }

        /// <summary>
        /// 完成标准.
        /// </summary>
        public string CompletionCriteria { get; set; }
        /// <summary>
        /// 统计人.
        /// </summary>
        public string Statistician { get; set; }
        /// <summary>
        /// 资源支持.
        /// </summary>
        public string ResourceSupport { get; set; }

        /// <summary>
        /// 预算
        /// </summary>
        public string Budget { get; set; }

        /// <summary>
        /// 预算1.
        /// </summary>
        public double? Budget1 { get; set; }

        /// <summary>
        /// 费用类别1.
        /// </summary>
        public string CostCategory1 { get; set; }

        /// <summary>
        /// 预算2.
        /// </summary>
        public double? Budget2 { get; set; }

        /// <summary>
        /// 费用类别2.
        /// </summary>
        public string CostCategory2 { get; set; }

        /// <summary>
        /// 预算3.
        /// </summary>
        public double? Budget3 { get; set; }

        /// <summary>
        /// 费用类别3.
        /// </summary>
        public string CostCategory3 { get; set; }

        /// <summary>
        /// 父级ID.
        /// </summary>
        public int ParentTargetID { get; set; }

        /// <summary>
        /// 父级ID.
        /// </summary>
        public bool Lock { get; set; }

        /// <summary>
        /// 目标中心.
        /// </summary>
        public string TargetCenter { get; set; }

        /// <summary>
        /// 目标团队.
        /// </summary>
        public string TargetTeam { get; set; }

        /// <summary>
        /// 子集
        /// </summary>
        public List<BSCReports_Dp> Child { get; set; }
    }
    public class BSCReports_DpOut
    {
        /// <summary>
        /// 向下搜索的ID
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 部门目标.
        /// </summary>
        public string DepartmentTarget { get; set; }

        /// <summary>
        /// 部门目标.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 一级计划内容
        /// </summary>
        public string content1 { get; set; }
        /// <summary>
        /// 完成标准.
        /// </summary>
        public string CompletionCriteria1 { get; set; }
        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime? StartingTime1 { get; set; }
        /// <summary>
        /// 实际完成时间.
        /// </summary>
        public DateTime? ActualCompletionTime1 { get; set; }

        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime? PlannedCompletionTime1 { get; set; }
        /// <summary>
        /// 责任人.
        /// </summary>
        public string Responsible1 { get; set; }

        /// <summary>
        /// 核算方式.
        /// </summary>
        public string AccountingMethod1 { get; set; }

        /// <summary>
        /// 统计人.
        /// </summary>
        public string Statistician1 { get; set; }
        /// <summary>
        /// 资源支持.
        /// </summary>
        public string ResourceSupport1 { get; set; }
        /// <summary>
        /// 一级计划内容
        /// </summary>
        public string content2 { get; set; }
        /// <summary>
        /// 完成标准.
        /// </summary>
        public string CompletionCriteria2 { get; set; }
        /// <summary>
        /// 子任1务完成情况
        /// </summary>
        public string progress1 { get; set; }

        /// <summary>
        /// 子任2务完成情况
        /// </summary>
        public string progress2 { get; set; }
        /// <summary>
        /// 目标状态.
        /// </summary>
        public string TargetState { get; set; }
        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime? StartingTime2 { get; set; }
        /// <summary>
        /// 实际完成时间.
        /// </summary>
        public DateTime? ActualCompletionTime2 { get; set; }
        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime? PlannedCompletionTime2 { get; set; }
        /// <summary>
        /// 责任人.
        /// </summary>
        public string Responsible2 { get; set; }

        /// <summary>
        /// 核算方式.
        /// </summary>
        public string AccountingMethod2 { get; set; }
        /// <summary>
        /// 统计人.
        /// </summary>
        public string Statistician2 { get; set; }
        /// <summary>
        /// 资源支持.
        /// </summary>
        public string ResourceSupport2 { get; set; }
        /// <summary>
        /// 一级计划内容
        /// </summary>
        public string content3 { get; set; }
        /// <summary>
        /// 完成标准.
        /// </summary>
        public string CompletionCriteria3 { get; set; }
        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime? StartingTime3 { get; set; }
        /// <summary>
        /// 实际完成时间.
        /// </summary>
        public DateTime? ActualCompletionTime3 { get; set; }
        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime? PlannedCompletionTime3 { get; set; }
        /// <summary>
        /// 责任人.
        /// </summary>
        public string Responsible3 { get; set; }

        /// <summary>
        /// 核算方式.
        /// </summary>
        public string AccountingMethod3 { get; set; }
        /// <summary>
        /// 统计人.
        /// </summary>
        public string Statistician3 { get; set; }
        /// <summary>
        /// 资源支持.
        /// </summary>
        public string ResourceSupport3 { get; set; }
        /// <summary>
        /// 预算
        /// </summary>
        public string Budget { get; set; }

        /// <summary>
        /// 目标中心.
        /// </summary>
        public string TargetCenter { get; set; }

        /// <summary>
        /// 目标团队.
        /// </summary>
        public string TargetTeam { get; set; }

        /// <summary>
        /// 完成标准.
        /// </summary>
        public string CompletionCriteria { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public bool Lock { get; set; }
        public object Clone()
        {
            return this.MemberwiseClone();
        }
    }
    public class TargetTotal
    {
        public int ID { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 目标描述.
        /// </summary>
        public string TargetDescription { get; set; }
        public int ParentTargetID { get; set; } = -1;
        public DateTime CreationTime { get; set; } = DateTime.Now;
        public string Version { get; set; }
    }
    public class TargetInput
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 目标描述.
        /// </summary>
        public string TargetDescription { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 考核方式.
        /// </summary>
        public string AssessmentMethod { get; set; }

        /// <summary>
        /// 核算方式.
        /// </summary>
        public string AccountingMethod { get; set; }

        /// <summary>
        /// 统计人.
        /// </summary>
        public string Statistician { get; set; }

        /// <summary>
        /// 资源支持.
        /// </summary>
        public string ResourceSupport { get; set; }

        /// <summary>
        /// 责任人.
        /// </summary>
        public string Responsible { get; set; }

        /// <summary>
        /// 计划文件路径.
        /// </summary>
        public string PlanningDocumentURL { get; set; }

        /// <summary>
        /// 上层目标ID.
        /// </summary>
        public int ParentTargetID { get; set; } = -1;

        /// <summary>
        /// 创建时间.
        /// </summary>
        public DateTime CreationTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime StartingTime { get; set; }

        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime PlannedCompletionTime { get; set; }

        /// <summary>
        /// 实际完成时间.
        /// </summary>
        public DateTime ActualCompletionTime { get; set; }

        /// <summary>
        /// 修改时间.
        /// </summary>
        public DateTime ReviseTime { get; set; }

        /// <summary>
        /// 审批人.
        /// </summary>
        public string Approver { get; set; }

        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; }

        /// <summary>
        /// 审批时间.
        /// </summary>
        public DateTime ApprovalTime { get; set; }

        /// <summary>
        /// 版本号.
        /// </summary>
        public string Version { get; set; }

        public bool Lock { get; set; }

    }

    public class BuMenBiaoOutput
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 上层目标ID.
        /// </summary>
        public int ParentTargetID { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }

        /// <summary>
        /// 目标名
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 目标描述.
        /// </summary>
        public string TargetDescription { get; set; }


        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 考核方式.
        /// </summary>
        public string AssessmentMethod { get; set; }

        /// <summary>
        /// 核算方式.
        /// </summary>
        public string AccountingMethod { get; set; }

        /// <summary>
        /// 统计人.
        /// </summary>
        public string Statistician { get; set; }

        /// <summary>
        /// 资源支持.
        /// </summary>
        public string ResourceSupport { get; set; }

        /// <summary>
        /// 责任人.
        /// </summary>
        public string Responsible { get; set; }

        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; }

        /// <summary>
        /// 起止时间
        /// </summary>
        public string[] Timespan { get; set; }
        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime StartingTime { get; set; }

        /// <summary>
        /// 计划完成时间
        /// </summary>
        public DateTime PlannedCompletionTime { get; set; }
        

        /// <summary>
        /// 版本号.
        /// </summary>
        public string Version { get; set; }

        /// <summary>
        /// 预算1.
        /// </summary>
        public double? Budget1 { get; set; }

        /// <summary>
        /// 费用类别1.
        /// </summary>
        public string CostCategory1 { get; set; }

        /// <summary>
        /// 预算1.
        /// </summary>
        public double? Budget2 { get; set; }

        /// <summary>
        /// 费用类别1.
        /// </summary>
        public string CostCategory2 { get; set; }

        /// <summary>
        /// 预算1.
        /// </summary>
        public double? Budget3 { get; set; }

        /// <summary>
        /// 费用类别1.
        /// </summary>
        public string CostCategory3 { get; set; }

        /// <summary>
        /// 费用类别1.
        /// </summary>
        public string email { get; set; }

        /// <summary>
        /// 目标中心.
        /// </summary>
        public string TargetCenter { get; set; }

        /// <summary>
        /// 目标团队.
        /// </summary>
        public string TargetTeam { get; set; }

        public  List<BuMenBiaoOutput> children { get; set; }
       

    }

    public class TargetOutput
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 是否锁定.
        /// </summary>
        public bool Lock { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 目标描述.
        /// </summary>
        public string TargetDescription { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 考核方式.
        /// </summary>
        public string AssessmentMethod { get; set; }

        /// <summary>
        /// 核算方式.
        /// </summary>
        public string AccountingMethod { get; set; }

        /// <summary>
        /// 统计人.
        /// </summary>
        public string Statistician { get; set; }

        /// <summary>
        /// 资源支持.
        /// </summary>
        public string ResourceSupport { get; set; }

        /// <summary>
        /// 责任人.
        /// </summary>
        public string Responsible { get; set; }

        /// <summary>
        /// 计划文件路径.
        /// </summary>
        public string PlanningDocumentURL { get; set; }

        /// <summary>
        /// 计划文件路径.
        /// </summary>
        public string TargetState { get; set; }

        /// <summary>
        /// 上层目标ID.
        /// </summary>
        public int ParentTargetID { get; set; } = -1;

        /// <summary>
        /// 创建时间.
        /// </summary>
        public DateTime CreationTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime StartingTime { get; set; }

        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime PlannedCompletionTime { get; set; }

        /// <summary>
        /// 实际完成时间.
        /// </summary>
        public DateTime ActualCompletionTime { get; set; }

        /// <summary>
        /// 修改时间.
        /// </summary>
        public DateTime ReviseTime { get; set; }

        /// <summary>
        /// 审批人.
        /// </summary>
        public string Approver { get; set; }

        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; }

        /// <summary>
        /// 审批时间.
        /// </summary>
        public DateTime ApprovalTime { get; set; }

        /// <summary>
        /// 版本号.
        /// </summary>
        public string Version { get; set; }

        /// <summary>
        /// 预算1.
        /// </summary>
        public double? Budget1 { get; set; }

        /// <summary>
        /// 费用类别1.
        /// </summary>
        public string CostCategory1 { get; set; }

        /// <summary>
        /// 预算2.
        /// </summary>
        public double? Budget2 { get; set; }

        /// <summary>
        /// 费用类别2.
        /// </summary>
        public string CostCategory2 { get; set; }

        /// <summary>
        /// 预算3.
        /// </summary>
        public double? Budget3 { get; set; }

        /// <summary>
        /// 费用类别3.
        /// </summary>
        public string CostCategory3 { get; set; }
        /// <summary>
        /// 层级深度.
        /// </summary>
        public int Depth { get; set; }

        /// <summary>
        /// 目标中心.
        /// </summary>
        public string TargetCenter { get; set; }

        /// <summary>
        /// 目标团队.
        /// </summary>
        public string TargetTeam { get; set; }

        /// <summary>
        /// 完成标准.
        /// </summary>
        public string CompletionCriteria { get; set; }

        /// <summary>
        /// 邮箱号.
        /// </summary>
        public string email { get; set; }

        public List<TargetOutput> children { get; set; }

       


    }

    /// <summary>
    /// 战略目标+部门目标
    /// </summary>
    public class TargetsOutput
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 上层目标ID.
        /// </summary>
        public int ParentTargetID { get; set; } 

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }

        /// <summary>
        /// 战略目标
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 部门目标名.
        /// </summary>
        public string DepTargetName { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 目标描述.
        /// </summary>
        public string TargetDescription { get; set; }


        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }


        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; }

        /// <summary>
        /// 起止时间
        /// </summary>
        public string[] Timespan { get; set; }

        /// <summary>
        /// 版本号.
        /// </summary>
        public string Version { get; set; }
        /// <summary>
        /// 层级深度.
        /// </summary>
        public int Depth { get; set; }
        public List<TargetsOutput> children { get; set; }

    }

    /// <summary>
    /// 预算费用对象
    /// </summary>
    public class BudgetFee
    {
        public string ID { get; set; }
        public string DepartmentID { get; set; }
        public string ExpenseIndex { get; set; }
        public decimal BudgetPrice { get; set; }
        public decimal UsePrice { get; set; }
        public string ApprovalStatus { get; set; }
        public string EmpName { get; set; }
        public DateTime CreateTime { get; set; }
        public string DepartmentName { get; set; }
        public string ExpenseName { get; set; }
        public int PersonNum { get; set; }
        public string VersionNum { get; set; }
        public string DepartmentHead { get; set; }
        public decimal ApplyTotalPrice { get; set; }
        public decimal RemainPrice { get; set; }
    }
    /// <summary>
    /// 费用分类
    /// </summary>
    public class ExpenseCate
    {
        /// <summary>
        /// 预算分类索引
        /// </summary>
        public string ExpenseIndex { get; set; }
        /// <summary>
        /// 预算分类名称
        /// </summary>
        public string ExpenseName { get; set; }
    }
    public class Depart
    {
        /// <summary>
        /// 部门索引
        /// </summary>
        public string DepartmentID { get; set; }
        /// <summary>
        /// 部门名称
        /// </summary>
        public string DepartmentName { get; set; }
    }

    public class TargetsInput
    {

        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }

        public string ClassificationID { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        public string DepartmentID { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 目标描述.
        /// </summary>
        public string TargetDescription { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 考核方式.
        /// </summary>
        public string AssessmentMethod { get; set; }

        /// <summary>
        /// 核算方式.
        /// </summary>
        public string AccountingMethod { get; set; }

        /// <summary>
        /// 统计人.
        /// </summary>
        public string Statistician { get; set; }

        /// <summary>
        /// 资源支持.
        /// </summary>
        public string ResourceSupport { get; set; }

        /// <summary>
        /// 责任人.
        /// </summary>
        public string Responsible { get; set; }

        /// <summary>
        /// 计划文件路径.
        /// </summary>
        public string PlanningDocumentURL { get; set; }

        /// <summary>
        /// 是否锁定.
        /// </summary>
        public bool Lock { get; set; }

        /// <summary>
        /// 目标状态.
        /// </summary>
        public string TargetState { get; set; }


        /// <summary>
        /// 上层目标ID.
        /// </summary>
        public int ParentTargetID { get; set; } = -1;

        /// <summary>
        /// 创建时间.
        /// </summary>
        public DateTime CreationTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime StartingTime { get; set; }

        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime PlannedCompletionTime { get; set; }

        /// <summary>
        /// 实际完成时间.
        /// </summary>
        public DateTime ActualCompletionTime { get; set; }

        /// <summary>
        /// 修改时间.
        /// </summary>
        public DateTime ReviseTime { get; set; }

        /// <summary>
        /// 审批人.
        /// </summary>
        public string Approver { get; set; }

        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; }

        /// <summary>
        /// 审批时间.
        /// </summary>
        public DateTime ApprovalTime { get; set; }

        /// <summary>
        /// 版本号.
        /// </summary>
        public string Version { get; set; }

        /// <summary>
        /// 预算1.
        /// </summary>
        public double? Budget1 { get; set; }

        /// <summary>
        /// 费用类别1.
        /// </summary>
        public string CostCategory1 { get; set; }

        /// <summary>
        /// 预算1.
        /// </summary>
        public double? Budget2 { get; set; }

        /// <summary>
        /// 费用类别1.
        /// </summary>
        public string CostCategory2 { get; set; }

        /// <summary>
        /// 预算1.
        /// </summary>
        public double? Budget3 { get; set; }

        /// <summary>
        /// 费用类别1.
        /// </summary>
        public string CostCategory3 { get; set; }

    }

    public class ResourceTarget
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 上层目标ID.
        /// </summary>
        public int ParentTargetID { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }
    }

    public class NewZongBiao
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 目标描述.
        /// </summary>
        public string TargetDescription { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 考核方式.
        /// </summary>
        public string AssessmentMethod { get; set; }

        /// <summary>
        /// 核算方式.
        /// </summary>
        public string AccountingMethod { get; set; }

        /// <summary>
        /// 统计人.
        /// </summary>
        public string Statistician { get; set; }

        /// <summary>
        /// 资源支持.
        /// </summary>
        public string ResourceSupport { get; set; }

        /// <summary>
        /// 责任人.
        /// </summary>
        public string Responsible { get; set; }

        /// <summary>
        /// 上层目标ID.
        /// </summary>
        public int ParentTargetID { get; set; } 

        /// <summary>
        /// 创建时间.
        /// </summary>
        public DateTime CreationTime { get; set; } = DateTime.Now;

        public string [] Timespan { get; set; }

        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime StartingTime { get ; set; } 

        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime PlannedCompletionTime { get; set; }

        /// <summary>
        /// 审批人.
        /// </summary>
        public string Approver { get; set; }

        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; } = "未审核";

        /// <summary>
        /// 审批时间.
        /// </summary>
        public DateTime ApprovalTime { get; set; }

        /// <summary>
        /// 版本号.
        /// </summary>
        public string Version { get; set; }

        /// <summary>
        /// 预算1.
        /// </summary>
        public double? Budget1 { get; set; }

        /// <summary>
        /// 费用类别1.
        /// </summary>
        public string CostCategory1 { get; set; }

        /// <summary>
        /// 预算2.
        /// </summary>
        public double? Budget2 { get; set; }

        /// <summary>
        /// 费用类别2.
        /// </summary>
        public string CostCategory2 { get; set; }

        /// <summary>
        /// 预算3.
        /// </summary>
        public double? Budget3 { get; set; }

        /// <summary>
        /// 费用类别3.
        /// </summary>
        public string CostCategory3 { get; set; }

        /// <summary>
        /// 层级深度.
        /// </summary>
        public int Depth { get; set; }

        /// <summary>
        /// 目标中心.
        /// </summary>
        public string TargetCenter { get; set; }

        /// <summary>
        /// 目标团队.
        /// </summary>
        public string TargetTeam { get; set; }

        /// <summary>
        /// 完成标准.
        /// </summary>
        public string CompletionCriteria { get; set; }

        /// <summary>
        /// 邮箱号.
        /// </summary>
        public string email { get; set; }
        public List<NewZongBiao> children { get; set; }
    }

    public class ZhanLueInput
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 上层目标ID.
        /// </summary>
        public int ParentTargetID { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 创建时间.
        /// </summary>
        public DateTime CreationTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; } = "未审核";
    }

    public class BuMenInput
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 上层目标ID.
        /// </summary>
        public int ParentTargetID { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 创建时间.
        /// </summary>
        public DateTime CreationTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; } = "未审核";

        /// <summary>
        /// 目标描述.
        /// </summary>
        public string TargetDescription { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }
        /// <summary>
        /// 目标团队.
        /// </summary>
        public string TargetTeam { get; set; }

        /// <summary>
        /// 目标中心.
        /// </summary>
        public string TargetCenter { get; set; }

    }

    public class BuMenInput2
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 上层目标ID.
        /// </summary>
        public int ParentTargetID { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string[] Departments { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 创建时间.
        /// </summary>
        public DateTime CreationTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; } = "未审核";

        /// <summary>
        /// 目标描述.
        /// </summary>
        public string TargetDescription { get; set; }

        /// <summary>
        /// 考核基准.
        /// </summary>
        public string AssessmentCriteria { get; set; }

        /// <summary>
        /// 分类.
        /// </summary>
        public string Classification { get; set; }
        /// <summary>
        /// 目标团队.
        /// </summary>
        public string TargetTeam { get; set; }

        /// <summary>
        /// 目标中心.
        /// </summary>
        public string TargetCenter { get; set; }
    }

    public class ShenHeBiao
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 上层目标ID.
        /// </summary>
        public int ParentTargetID { get; set; }

        /// <summary>
        /// 部门.
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 目标名.
        /// </summary>
        public string TargetName { get; set; }

        /// <summary>
        /// 责任人.
        /// </summary>
        public string Responsible { get; set; }

        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime StartingTime { get; set; }

        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime PlannedCompletionTime { get; set; }

        /// <summary>
        /// 审批人.
        /// </summary>
        public string Approver { get; set; }

        /// <summary>
        /// 审批状态.
        /// </summary>
        public string ApprovalStatus { get; set; }

        /// <summary>
        /// 审批时间.
        /// </summary>
        public DateTime ApprovalTime { get; set; }

        /// <summary>
        /// 层级深度.
        /// </summary>
        public int Depth { get; set; }

        /// <summary>
        /// 考核方式.
        /// </summary>
        public string AssessmentMethod { get; set; }

        /// <summary>
        /// 统计人.
        /// </summary>
        public string Statistician { get; set; }

        public ShenHeBiao Child { get; set; }
        public object Clone()
        {
            return this.MemberwiseClone();
        }
        

    }

    public class ShenHeOutput
    {
        /// <summary>
        /// 主键ID,自增长.
        /// </summary>
        public int ID { get; set; }
        public string FenLeiTargetName { get; set; }
        public string ZhanLueTargetName { get; set; }

        public string BuMenTargetName { get; set; }
        public string Department { get; set; }


        public string JiHuaTargetName1 { get; set; }

        /// <summary>
        /// 责任人.
        /// </summary>
        public string JiHuaResponsible1 { get; set; }

        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime? JiHuaStartingTime1 { get; set; }

        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime? JiHuaPlannedCompletionTime1 { get; set; }


        public string JiHuaTargetName2 { get; set; }

        /// <summary>
        /// 责任人.
        /// </summary>
        public string JiHuaResponsible2 { get; set; }

        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime? JiHuaStartingTime2 { get; set; }

        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime? JiHuaPlannedCompletionTime2 { get; set; }


        public string JiHuaTargetName3 { get; set; }

        /// <summary>
        /// 责任人.
        /// </summary>
        public string JiHuaResponsible3 { get; set; }

        /// <summary>
        /// 开始时间.
        /// </summary>
        public DateTime? JiHuaStartingTime3 { get; set; }

        /// <summary>
        /// 计划完成时间.
        /// </summary>
        public DateTime? JiHuaPlannedCompletionTime3 { get; set; }


        /// <summary>
        /// 完成标准.
        /// </summary>
        public string CompletionCriteria { get; set; }

        /// <summary>
        /// 资源支持.
        /// </summary>
        public string ResourceSupport { get; set; }

        /// <summary>
        /// 核算方式.
        /// </summary>
        public string AccountingMethod { get; set; }

        /// <summary>
        /// 统计人.
        /// </summary>
        public string Statistician { get; set; }
        public object Clone()
        {
            return this.MemberwiseClone();
        }


    }

}
